define(['jquery','utils'],function ($,utils) {
	function car() {

	}

	car.prototype = {
		init () {
			utils.setBannerHeight();
			this.deleteCart();
		},

		deleteCart () {
			$('.deleteCar').on('click',function () {
				utils.post({
					url: '/car/deleteCar',
					data: { courseid: $(this).attr("id"), userid: utils.getUserId() }
				}, (res) => {
					res.status != 200
						? uikit.notification({ message: '删除失败', status: 'danger', pos: 'top-right', timeout: 5000 })
						: location.reload();
				});
			})
		}
	};

	return new car();
});